package com.hxd.otc.module.convenience.bean;

import com.hxd.otc.common.enums.PhoneLocationEnum;
import com.hxd.otc.utils.StringUtil;

import java.io.Serializable;

/**
 * Created by lzy on 2018/12/13 0013.
 * description ${充值话费Bean}
 */
public class NorGoodsBean implements Serializable {

    private String id;
    private String goodsSource;
    private String goodsCode;// 充值话费时，相当之前的itemId
    private String goodsName;//商品名称
    private String goodsIcon;//
    private String moduleId;
    private String moduleCode;//(暂时在视频中使用)
    private String moduleTitle;
    private double sellPrice;//售价
    private double bidPrice;
    private double finalPrice;
    private String priceUnit;//商品价格符号
    private String status;
    private String errorStatus;
    private Object createDate;
    private String updateDate;
    private Object createBy;
    private Object updateBy;
    private double volume;//虚拟币标价
    private String symbol;//标价符号
    private int bgType;//标价符号

    private String operator;//0 无 1、移动 2、联通 3、电信【话费商品专用】

    public int getBgType() {
        return bgType;
    }

    public void setBgType(int bgType) {
        this.bgType = bgType;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getGoodsSource() {
        return goodsSource;
    }

    public void setGoodsSource(String goodsSource) {
        this.goodsSource = goodsSource;
    }

    public String getGoodsCode() {
        return goodsCode;
    }

    public void setGoodsCode(String goodsCode) {
        this.goodsCode = goodsCode;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public String getGoodsIcon() {
        return goodsIcon;
    }

    public void setGoodsIcon(String goodsIcon) {
        this.goodsIcon = goodsIcon;
    }

    public String getModuleId() {
        return moduleId;
    }

    public void setModuleId(String moduleId) {
        this.moduleId = moduleId;
    }

    public String getModuleCode() {
        return moduleCode;
    }

    public void setModuleCode(String moduleCode) {
        this.moduleCode = moduleCode;
    }

    public String getModuleTitle() {
        return moduleTitle;
    }

    public void setModuleTitle(String moduleTitle) {
        this.moduleTitle = moduleTitle;
    }

    public double getSellPrice() {
        return sellPrice;
    }

    public String getSellPriceSymbol() {
        if ("CNY".equals(priceUnit)) {
            return "元";
        }
        return StringUtil.emptyIfNull(priceUnit);
    }

    public void setSellPrice(double sellPrice) {
        this.sellPrice = sellPrice;
    }

    public double getBidPrice() {
        return bidPrice;
    }

    public void setBidPrice(double bidPrice) {
        this.bidPrice = bidPrice;
    }

    public double getFinalPrice() {
        return finalPrice;
    }

    public void setFinalPrice(double finalPrice) {
        this.finalPrice = finalPrice;
    }

    public String getPriceUnit() {
        return priceUnit;
    }

    public void setPriceUnit(String priceUnit) {
        this.priceUnit = priceUnit;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getErrorStatus() {
        return errorStatus;
    }

    public void setErrorStatus(String errorStatus) {
        this.errorStatus = errorStatus;
    }

    public Object getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Object createDate) {
        this.createDate = createDate;
    }

    public String getUpdateDate() {
        return updateDate;
    }

    public void setUpdateDate(String updateDate) {
        this.updateDate = updateDate;
    }

    public Object getCreateBy() {
        return createBy;
    }

    public void setCreateBy(Object createBy) {
        this.createBy = createBy;
    }

    public Object getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(Object updateBy) {
        this.updateBy = updateBy;
    }

    public double getVolume() {
        return volume;
    }

    public void setVolume(double volume) {
        this.volume = volume;
    }

    public String getSymbol() {
        return symbol;
    }

    public void setSymbol(String symbol) {
        this.symbol = symbol;
    }

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    public PhoneLocationEnum getLocationEnum() {
        return PhoneLocationEnum.getInstance(operator);
    }

    @Override
    public String toString() {
        return "NorGoodsBean{" +
                "id='" + id + '\'' +
                ", goodsSource='" + goodsSource + '\'' +
                ", goodsCode=" + goodsCode +
                ", goodsName='" + goodsName + '\'' +
                ", goodsIcon='" + goodsIcon + '\'' +
                ", moduleId='" + moduleId + '\'' +
                ", moduleCode='" + moduleCode + '\'' +
                ", moduleTitle='" + moduleTitle + '\'' +
                ", sellPrice=" + sellPrice +
                ", bidPrice=" + bidPrice +
                ", finalPrice=" + finalPrice +
                ", priceUnit='" + priceUnit + '\'' +
                ", status='" + status + '\'' +
                ", errorStatus='" + errorStatus + '\'' +
                ", createDate=" + createDate +
                ", updateDate='" + updateDate + '\'' +
                ", createBy=" + createBy +
                ", updateBy=" + updateBy +
                ", volume=" + volume +
                ", symbol='" + symbol + '\'' +
                ", bgType=" + bgType +
                ", operator='" + operator + '\'' +
                '}';
    }
}
